package com.wx.redis.test.listener.a;

import com.google.gson.Gson;
import com.wx.redis.mq.AbstractMqListener;
import com.wx.redis.mq.TopicMqConstant;
import com.wx.redis.test.send.A;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @author weixin 2024/11/20 15:44
 */
@Component
@Slf4j
public class AListener extends AbstractMqListener {
    @Override
    protected String getQueue() {
        return TopicMqConstant.topic_a_add;
    }

    @Override
    protected void doJob(String param) {
        Gson gson = new Gson();
        A a = gson.fromJson(param, A.class);
        log.info("订阅者a 获取到消息。param：{}",param);
    }
}
